﻿using System.Collections.Generic;
using System.Linq;
using SmallBusinessKit.DataAccess.Infrastructure;
using SmallBusinessKit.DataAccess.Interfaces;
using SmallBusinessKit.Models.Entities;

namespace SmallBusinessKit.DataAccess.Repositories
{
    public class XmlCategoryRepository : XmlRepositoryBase<Category>, ICategoryRepository
    {
        public XmlCategoryRepository(IList<Category> data) : base(data) {}
        
        public override Category GetById(string id)
        {
            return (DataList.FirstOrDefault(i => i.Id == id));
        }
    }    
}
